package sort;

import java.util.Arrays;

public class BubbleSort {
    public static void main(String[] args) {
        BubbleSort bubbleSort = new BubbleSort();
        int[] keys = new int[]{4, 5, 8, 1, 2, 7, 3, 6};
        System.out.print("关键字序列：");
        System.out.println(Arrays.toString(keys));
        bubbleSort.bubbleSort(keys);
    }

    //冒泡排序
    public void bubbleSort(int[] keys) {
        System.out.println("冒泡排序");

    }

    // 交换数组i,j索引存储的值
    private void swap(int[] keys, int i, int j) {
        int temp = keys[j];
        keys[j] = keys[i];
        keys[i] = temp;
    }
}
